#ifndef MASTER_STRING_HPP
#define MASTER_STRING_HPP

#include "../Base/BaseData.hpp"

using namespace base;

template <typename TString>
class MasterString {
public:
    enum CompareE {
        Less = -1,
        Equal = 0,
        More = 1,
    };

    virtual ~MasterString() = default;

    virtual Status strAssign(TString& t, const char* chars) = 0;
    virtual Status strCopy(TString& t, const TString s) = 0;
    virtual bool strEmpty(const TString s) = 0;
    virtual CompareE strCompare(const TString s, const TString t) = 0;
    virtual int strLength(const TString s) = 0;
    virtual Status clearString(TString& s) = 0;
    virtual Status concat(TString& s, const TString s1, const TString s2) = 0;
    virtual Status subString(TString& sub, const TString s, int pos,int len) = 0;
    virtual int index(const TString s, const TString t, int pos) = 0;
    virtual Status replace(TString& s, TString t, TString v) = 0;
    virtual Status strInsert(TString& s, int pos, TString t) = 0;
    virtual Status strDelete(TString& s, int pos, int len) = 0;
    virtual Status destoryString(TString& s) = 0;
};

#endif
